Matthias Clasen [Wed, 24 Jun 2020 19:58:03 +0000 (19:58 +0000)]
Merge branch 'scrolled-window-api' into 'master'
scrolledwindow: Don't take adjustments in new()
See merge request GNOME/gtk!2146
Matthias Clasen [Wed, 24 Jun 2020 19:50:37 +0000 (19:50 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2145
Matthias Clasen [Wed, 24 Jun 2020 18:06:50 +0000 (14:06 -0400)]
testgtk: Update list of cursor names
Use the standard names, since that is what we want
everybody else to use too.
Matthias Clasen [Wed, 24 Jun 2020 17:01:34 +0000 (13:01 -0400)]
Install gtkstringlist.h
Matthias Clasen [Wed, 24 Jun 2020 04:26:27 +0000 (00:26 -0400)]
entrycompletion: Various fixes
Fix various issues that prevented inline completion
and inline selection from working reliably. We were
passing byte counts to gtk_editable_select_region in
one place, but that function expects char counts.
We were listening for GtkEditable::insert-text on
the GtkText widget, but that does not emit those signals,
so listen for GtkEntryBuffer::inserted-text instead.
Finally, we were not clearing the stored completion_prefix
enough, leading to situations where the stored prefix
does not match the text in the entry anymore.
Matthias Clasen [Wed, 24 Jun 2020 04:27:21 +0000 (00:27 -0400)]
gtk-demo: Enable inline completion
Enable inline completion in the entry completion
demo, to have some code exercising this feature.
It is broken.
Matthias Clasen [Wed, 24 Jun 2020 02:39:16 +0000 (22:39 -0400)]
gtk-demo: Improve the entry completion demo
Add more strings.
Matthias Clasen [Wed, 24 Jun 2020 15:25:09 +0000 (11:25 -0400)]
scrolledwindow: Don't take adjustments in new()
In 99.9% of all cases, these are just NULL, NULL.
So just do away with these arguments, people can
use the setters for the rare cases where they want
the scrolled window to use a different adjustment.
Matthias Clasen [Tue, 23 Jun 2020 20:43:49 +0000 (20:43 +0000)]
Merge branch 'stringlist' into 'master'
add a public stringlist api
See merge request GNOME/gtk!2134
Matthias Clasen [Sun, 21 Jun 2020 22:00:29 +0000 (18:00 -0400)]
Add GtkStringList as public api
This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.
Matthias Clasen [Tue, 23 Jun 2020 19:12:52 +0000 (19:12 +0000)]
Merge branch 'wip/jimmac/notebook-legibility' into 'master'
Adwaita: notebook legibility fixes
Closes #2652
See merge request GNOME/gtk!2142
Matthias Clasen [Tue, 23 Jun 2020 19:10:54 +0000 (19:10 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2141
Jakub Steiner [Tue, 23 Jun 2020 17:54:54 +0000 (19:54 +0200)]
Adwaita: notebook legibility fixes
- make inactive tabs more legible
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2652
Matthias Clasen [Sun, 21 Jun 2020 22:03:39 +0000 (18:03 -0400)]
Add a few missing includes
These sources are using GtkListStore apis,
but were replying on indirect includes to
get the header. Make this explicit, to prepare
for GtkEntryCompletion losing its tree view
dependencies.
Matthias Clasen [Sun, 21 Jun 2020 19:28:56 +0000 (15:28 -0400)]
entry completion: Drop the Private struct
This is in preparation for porting GtkEntryCompletion
to use GtkListView.
Ray Strode [Tue, 23 Jun 2020 09:53:35 +0000 (09:53 +0000)]
Merge branch 'wip/fencing-without-context-is-discouraged' into 'master'
x11: Ensure bound context is compatible with sync fence
See merge request GNOME/gtk!2139
Ray Strode [Mon, 22 Jun 2020 21:13:54 +0000 (17:13 -0400)]
x11: Ensure bound context is compatible with sync fence
Commit
a0f6ff101e781aaf0a931be6e22f2885f4f69e04 made sure that a
context was bound before calling glClientWaitSync, but it doesn't
check that the context shares objects with the context that created
the fence.
This commit does a little more validation before deciding the current
context is good enough.
Matthias Clasen [Mon, 22 Jun 2020 23:01:11 +0000 (23:01 +0000)]
Merge branch 'wip/fencing-without-context-is-discouraged' into 'master'
x11: ensure some context is bound before calling glClientWaitSync
See merge request GNOME/gtk!2138
Matthias Clasen [Mon, 22 Jun 2020 22:59:17 +0000 (22:59 +0000)]
Merge branch 'drop-entry-completion-actions' into 'master'
entrycompletion: Drop action support
See merge request GNOME/gtk!2136
Matthias Clasen [Mon, 22 Jun 2020 22:13:30 +0000 (22:13 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add a basic clipboard test
See merge request GNOME/gtk!2137
Ray Strode [Mon, 22 Jun 2020 21:13:54 +0000 (17:13 -0400)]
x11: ensure some context is bound before calling glClientWaitSync
Since commit
972134abe48a4c9c7b6ad41b0723f30f4e7ae16b we now call
glClientWaitSync for the vendor nvidia driver, to know when a frame
is ready for the compositor to process.
glClientWaitSync can be called regardless of which context is currently
bound, but if no context is bound at all, it returns 0 without
doing anything.
This commit checks for that edge case, and ensures a context gets
made current in the event no context is already current, before calling
glClientWaitSync.
Matthias Clasen [Mon, 22 Jun 2020 20:36:22 +0000 (16:36 -0400)]
Add a basic clipboard test
This is not reproducing the failure I'm after, unfortunately.
Matthias Clasen [Mon, 22 Jun 2020 18:12:45 +0000 (14:12 -0400)]
entrycompletion: Drop action support
This api has not really been kept up with current
user experiences in popups, and we're better off
just dropping it and letting people do their own
popups if they need custom UI.
Matthias Clasen [Mon, 22 Jun 2020 18:13:25 +0000 (18:13 +0000)]
Merge branch 'keyval-to-uni-fix' into 'master'
gdk: Make gdk_keyval_to_unicode platform-independent
See merge request GNOME/gtk!2132
Matthias Clasen [Mon, 22 Jun 2020 17:56:43 +0000 (17:56 +0000)]
Merge branch 'fix-entry-completion' into 'master'
Fix entry completion
See merge request GNOME/gtk!2135
Matthias Clasen [Mon, 22 Jun 2020 17:24:34 +0000 (13:24 -0400)]
gdk: Clarify the docs of gdk_keyval_to_unicode
Explicitly state that the conversion does not
take locale into account, and point out GDK_KEY_KP_Decimal
as a candidate for special-casing.
Matthias Clasen [Mon, 22 Jun 2020 16:48:42 +0000 (12:48 -0400)]
entry completion: Make keynav work again
Use gtk_widget_prepend_controller to supersede entry keynav
while the popup is open. This fixes selecting completions
with the keyboard - the Enter keypress was ending up
triggering GtkText::activate instead of inserting the
selected completion into the entry.
Matthias Clasen [Mon, 22 Jun 2020 16:47:27 +0000 (12:47 -0400)]
Add gtk_widget_prepend_controller
Add a variant of gtk_widget_add_controller that
inserts the controller at the beginning, instead
of the end. This will be used in entry completion
to make sure the entry completion key event handling
supersedes the entry one while the popup is open.
Keep this private for now, until we determine if
it needs to be public api.
Matthias Clasen [Mon, 22 Jun 2020 16:46:12 +0000 (12:46 -0400)]
Fix change notification for event controllers
We were adding event controllers at the end, but
announcing a change at the beginning, in
gtk_widget_add_controller. Fix that by emitting
::items-changed for the position where we actually
inserted the controller.
Matthias Clasen [Mon, 22 Jun 2020 16:31:15 +0000 (12:31 -0400)]
entrycompletion: Name the controllers
This helps with debugging.
Matthias Clasen [Mon, 22 Jun 2020 15:47:27 +0000 (15:47 +0000)]
Merge branch 'wip/dont-assert-without-evidence' into 'master'
x11: be more verbose when glClientWaitSync behaves unexpectedtly
See merge request GNOME/gtk!2133
Ray Strode [Mon, 22 Jun 2020 15:07:32 +0000 (11:07 -0400)]
x11: be more verbose when glClientWaitSync behaves unexpectedtly
When given a 0 timeout, glClientWaitSync is only supposed to return one
of three possible values:
- GL_ALREADY_SIGNALED - fence fired
- GL_WAIT_FAILED - there was an error
- GL_TIMEOUT_EXPIRED - fence hasn't fired yet
In addition, it can also return GL_CONDITION_SATISFIED if a non-zero
timeout is passed, and the fence fires while waiting on the timeout.
Since commit
972134abe48a4c9c7b6ad41b0723f30f4e7ae16b we now call
glClientWaitSync (with a 0 timeout), but one user is reporting it's
returning some value that's not one of the above four.
This commit changes the g_assert to a g_error so we can see what
value is getting returned.
May help with https://gitlab.gnome.org/GNOME/gtk/-/issues/2858
Matthias Clasen [Mon, 22 Jun 2020 13:11:13 +0000 (13:11 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Add a warning to the colors demo
See merge request GNOME/gtk!2131
Matthias Clasen [Mon, 22 Jun 2020 12:31:10 +0000 (08:31 -0400)]
gdk: Make gdk_keyval_to_unicode platform-independent
The result of gdk_keyval_to_unicode should not depend
on the platform.
Timm Bäder [Mon, 22 Jun 2020 12:02:26 +0000 (12:02 +0000)]
Merge branch 'master.msvc' into 'master'
demos: Fix builds against Visual Studio headers
See merge request GNOME/gtk!2130
Matthias Clasen [Mon, 22 Jun 2020 11:43:47 +0000 (07:43 -0400)]
gtk-demo: Add a warning to the colors demo
Explain that the big sizes cause lockups.
Chun-wei Fan [Mon, 22 Jun 2020 09:04:18 +0000 (17:04 +0800)]
demos: Fix builds against Visual Studio headers
According to [1], '_timezone' is already used for a global variable in the
time.h system header that is supplied by Microsoft, so using that for our
variable name when we are including time.h either directly or indirectly
will cause trouble.
This renames such variables to '_tz' to avoid that
[1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/daylight-dstbias-timezone-and-tzname
Matthias Clasen [Mon, 22 Jun 2020 00:09:00 +0000 (00:09 +0000)]
Merge branch 'port-icon-browser' into 'master'
Port icon browser
See merge request GNOME/gtk!2127
Matthias Clasen [Sun, 21 Jun 2020 17:57:31 +0000 (17:57 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
filter: Make GtkEveryFilter buildable
See merge request GNOME/gtk!2125
Matthias Clasen [Mon, 8 Jun 2020 18:25:54 +0000 (14:25 -0400)]
Port the icon browser to GtkGridView
Matthias Clasen [Sun, 21 Jun 2020 17:07:08 +0000 (13:07 -0400)]
filter: Make GtkEveryFilter buildable
Due to an oversight, when multi filters were split into
any and every, any ended up with the listmodel and buildable
implementations, and every didn't get any.
Move the implementations up.
Matthias Clasen [Sun, 21 Jun 2020 12:49:49 +0000 (12:49 +0000)]
Merge branch 'wip/otte/listview-colors' into 'master'
Improve listview-colors demo
See merge request GNOME/gtk!2123
Matthias Clasen [Sun, 21 Jun 2020 05:06:58 +0000 (01:06 -0400)]
gtk-demo: Cosmetic improvement to the colors demo
Make the count label not jump around, as the model
is refilled.
Benjamin Otte [Sun, 21 Jun 2020 04:54:21 +0000 (06:54 +0200)]
gtk-demo: Add an "Unsorted" option (and default to it)
Tests the previous commit and ensures that selecting 16M colors actually
works quickly (it does).
Benjamin Otte [Sun, 21 Jun 2020 04:53:44 +0000 (06:53 +0200)]
sortlistmodel: Look at order
For now, we just look at SORT_ORDER_NONE to bypass any sorting.
Benjamin Otte [Sun, 21 Jun 2020 03:21:11 +0000 (05:21 +0200)]
gtk-demo: Reinstate incremental filling
Do it via the new size setting on the color list.
Also add an option to set the maximum size of the color list that it'll
be filled to so rudimentary performance testing is possible.
Hint: Do not select
16777216.
This reinstates commit
c16848c2bb683f7ddf51571aa5951f8a4a1ea622.
Benjamin Otte [Sun, 21 Jun 2020 02:44:52 +0000 (04:44 +0200)]
gtk-demo: Allow color list to have any size
For now, limit it to 1<<12 so the sorters don't explode.
Benjamin Otte [Sun, 21 Jun 2020 02:11:24 +0000 (04:11 +0200)]
gtk-demo: Add a permutation to compute colors from the position
This way, the colors are furthest apart at the start and fill up the
remaining spots towards the end.
Benjamin Otte [Fri, 19 Jun 2020 21:47:56 +0000 (23:47 +0200)]
gtk-demo: Add custom listmodel for all true colors.
Benjamin Otte [Fri, 19 Jun 2020 01:59:59 +0000 (03:59 +0200)]
gtk-demo: Make colors demo contain all 16,777,216 colors
This makes it slightly slow, so not sure it should stay like this.
Benjamin Otte [Tue, 16 Jun 2020 20:24:56 +0000 (22:24 +0200)]
gtk-demo: Compute HSV values directly
Benjamin Otte [Sun, 21 Jun 2020 01:56:53 +0000 (03:56 +0200)]
Revert "gtk-demo: Make the colors demo populate incrementally"
This eases adding a bunch of follow-up features. After those features
have landed, this functionality will be readded.
This reverts commit
a10340859df6aec405d9b6fc6e25c4790137af85.
Benjamin Otte [Tue, 16 Jun 2020 19:11:25 +0000 (21:11 +0200)]
gtk-demo: Embed the RGBA value
Aurimas Černius [Sun, 21 Jun 2020 11:47:05 +0000 (14:47 +0300)]
Updated Lithuanian translation
Piotr Drąg [Sun, 21 Jun 2020 09:37:46 +0000 (11:37 +0200)]
Update Polish translation
Matthias Clasen [Sun, 21 Jun 2020 05:58:15 +0000 (05:58 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!2122
Matthias Clasen [Sun, 21 Jun 2020 05:20:05 +0000 (01:20 -0400)]
filechooserwidget: Use gtk_drop_down_get_selected_item
This showed up as a test failure when we get NULL as
selected item and then try to unref it. Luckily
get_selected_item is transfer none, so we don't have
to worry about it.
Benjamin Otte [Sun, 21 Jun 2020 00:14:53 +0000 (02:14 +0200)]
demo: Use GtkDropDown::selected-item
Benjamin Otte [Sun, 21 Jun 2020 00:17:47 +0000 (02:17 +0200)]
dropdown: emit notify for selected from the changed callback
Otherwise we don't emit it when the selection itself changes it - for
exaple because the model changed.
Matthias Clasen [Sat, 20 Jun 2020 21:21:29 +0000 (21:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
misc listview scrolling fixes
See merge request GNOME/gtk!2119
Matthias Clasen [Sat, 20 Jun 2020 20:35:23 +0000 (20:35 +0000)]
Merge branch 'incremental-colors' into 'master'
Incremental colors demo
See merge request GNOME/gtk!2121
Matthias Clasen [Sat, 20 Jun 2020 18:51:18 +0000 (18:51 +0000)]
Merge branch 'drop-down-selected-item' into 'master'
dropdown: Add GtkDropDown:selected-item
Closes #2861
See merge request GNOME/gtk!2120
Matthias Clasen [Sat, 20 Jun 2020 16:37:13 +0000 (12:37 -0400)]
gtk-demo: Make the colors demo populate incrementally
Add a refill button that incrementally refills the color
demo. This is useful to test how the grid view operates
when the model is frequently changed.
Matthias Clasen [Sat, 20 Jun 2020 12:48:29 +0000 (08:48 -0400)]
gtk-demo: Clean up initial selection handling
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in
10bcbae68c3faf8ae.
Matthias Clasen [Sat, 20 Jun 2020 17:12:52 +0000 (17:12 +0000)]
Merge branch 'gtk4-arb_fbo' into 'master'
Switch to GL_ARB_framebuffer_object
See merge request GNOME/gtk!2079
Matthias Clasen [Sat, 20 Jun 2020 17:11:48 +0000 (13:11 -0400)]
dropdown: Add GtkDropDown:selected-item
This is the same readonly property we have in
GtkSingleSelection.
Fixes: #2861
Matthias Clasen [Sat, 20 Jun 2020 16:18:17 +0000 (12:18 -0400)]
gtk-demo: Clean up memory handling in the weather demo
gtk_weather_info_new was consuming the info, but not
the timestamp, which confused me. Make it not consume
either, and be more explicit about where the unrefs
happen.
Matthias Clasen [Sat, 20 Jun 2020 16:11:59 +0000 (12:11 -0400)]
gridview: Don't assert on a condition that can happen
We are currently not robust against model changes or
widget invalidations, so we can actually end up in
situations where we run out of items here. Handle
the failure a bit more gracefully, by returning NULL.
This is good enough to make scrolling work okish most
of the time. We still need a proper fix to handle
other situations.
Benjamin Otte [Sat, 20 Jun 2020 16:08:46 +0000 (12:08 -0400)]
gridview: Compute right amount of items to skip
We only want to skip the remaining items in the current row, not since
the start of the widget.
Matthias Clasen [Sat, 20 Jun 2020 12:48:29 +0000 (08:48 -0400)]
gtk-demo: Clean up initial selection handling
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in
10bcbae68c3faf8ae.
Matthias Clasen [Fri, 19 Jun 2020 23:57:47 +0000 (23:57 +0000)]
Merge branch 'dnd-demo-animation' into 'master'
gtk-demo: Add animated icons to the dnd demo
See merge request GNOME/gtk!2117
Matthias Clasen [Fri, 19 Jun 2020 23:18:45 +0000 (19:18 -0400)]
gtk-demo: Add animated icons to the dnd demo
This is to test animated drag icons.
Matthias Clasen [Fri, 19 Jun 2020 22:24:36 +0000 (22:24 +0000)]
Merge branch 'listview-dnd' into 'master'
Listview dnd
See merge request GNOME/gtk!2116
Matthias Clasen [Fri, 19 Jun 2020 19:09:57 +0000 (15:09 -0400)]
testlistdnd: Use editable labels
Use editable labels instead of entries, and write
changes back to the model.
Matthias Clasen [Fri, 19 Jun 2020 19:24:24 +0000 (15:24 -0400)]
editablelabel: Allow to drag text
If we allow editing, we should allow direct drags too.
Matthias Clasen [Fri, 19 Jun 2020 19:08:43 +0000 (15:08 -0400)]
editablelabel: Accept text drops
This seems natural. If we allow editing, we should
allow drops too.
Matthias Clasen [Fri, 19 Jun 2020 16:37:39 +0000 (12:37 -0400)]
testlistdnd: Add a tree
This lets us test auto-expand of tree expanders.
Matthias Clasen [Fri, 19 Jun 2020 18:15:55 +0000 (14:15 -0400)]
expander: Remove a pointless return
GtkDropControllerMotion::enter does not expect
a boolean return value, so don't provide one.
Matthias Clasen [Fri, 19 Jun 2020 18:15:05 +0000 (14:15 -0400)]
treeexpander: Auto-expand during DND
When hovering over a tree expander during DND,
expand the tree after a timeout. This matches
the behavior of GtkTreeView and GtkExpander.
Matthias Clasen [Fri, 19 Jun 2020 12:51:32 +0000 (08:51 -0400)]
Add a list dnd example
Add a test for dnd with listview, gridview and columnview.
Matthias Clasen [Fri, 19 Jun 2020 16:23:28 +0000 (12:23 -0400)]
columnview: Increase the autoscroll threshold
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
Matthias Clasen [Fri, 19 Jun 2020 16:22:25 +0000 (12:22 -0400)]
columnview: Autoscroll during DND
Use a drop motion controller to autoscroll horizontally
while a drag operation is hovering over the list. The
vertical scrolling is handled by the listview.
Matthias Clasen [Fri, 19 Jun 2020 15:54:12 +0000 (11:54 -0400)]
columnview: separate autoscroll from headers
Break out an update_autoscroll() function that can
be used for other things than header DND. It will
be used for autoscroll during DND in the future.
Matthias Clasen [Fri, 19 Jun 2020 13:58:31 +0000 (09:58 -0400)]
listbase: Don't use adjustments for autoscrolling
Don't consult the adjustments when determining
scroll deltas. It isn't necessary.
Matthias Clasen [Fri, 19 Jun 2020 12:19:34 +0000 (08:19 -0400)]
listbase: Increase the autoscroll threshold
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
Matthias Clasen [Fri, 19 Jun 2020 12:18:54 +0000 (08:18 -0400)]
listbase: Autoscroll during DND
Use a drop motion controller to autoscroll while
a drag operation is hovering over the list.
Matthias Clasen [Fri, 19 Jun 2020 12:03:51 +0000 (08:03 -0400)]
listbase: separate autoscroll from rubberband
Break out an update_autoscroll() function that can
be used for other things than rubberbanding. It will
be used for autoscroll during DND in the future.
Matthias Clasen [Fri, 19 Jun 2020 16:17:27 +0000 (16:17 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2115
Matthias Clasen [Fri, 19 Jun 2020 15:40:54 +0000 (11:40 -0400)]
columview: Fix cell creation
We were getting lost in the columnview internal
structure here. The rows are children of the listview,
not of the columnview itself.
Matthias Clasen [Thu, 18 Jun 2020 11:48:56 +0000 (07:48 -0400)]
gtk-demo: Modernize the tag entry demo
Use a layout manager, and reduce boilerplate.
Matthias Clasen [Thu, 18 Jun 2020 03:42:21 +0000 (23:42 -0400)]
Revert "notebook: Don't capture clicks"
This reverts commit
37eb0496b60f3612f15fd9d0fb43a3e3f2ecc144.
This change broke notebook scroll arrows.
Benjamin Otte [Fri, 19 Jun 2020 15:20:32 +0000 (15:20 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
listbase: Fix copy/paste error
See merge request GNOME/gtk!2114
Benjamin Otte [Fri, 19 Jun 2020 13:50:10 +0000 (15:50 +0200)]
listbase: Fix copy/paste error
This could lead to "flickering" scroll behavior when scrolling
horizontally.
Florentina Mușat [Fri, 19 Jun 2020 06:17:36 +0000 (06:17 +0000)]
Update Romanian translation
Timm Bäder [Fri, 19 Jun 2020 03:58:09 +0000 (05:58 +0200)]
stack: Avoid using an uninitialized value
This was showing up as criticals since for_size != >= -1.
Timm Bäder [Thu, 18 Jun 2020 05:55:22 +0000 (07:55 +0200)]
stack: Add missing accessors for GtkStackPage properties
Timm Bäder [Mon, 15 Jun 2020 08:30:40 +0000 (10:30 +0200)]
stack: Fix some documentation mishaps
Timm Bäder [Sat, 13 Jun 2020 19:25:21 +0000 (21:25 +0200)]
stack: Fix :needs-attention docs
This is a property on GtkStackPage these days.
Timm Bäder [Sat, 13 Jun 2020 18:40:40 +0000 (20:40 +0200)]
widget: Don't leak css transform
Timm Bäder [Sat, 13 Jun 2020 06:39:19 +0000 (08:39 +0200)]
treeview: Remove identical if branches
Fixes #2725